public class User{
    public static void main(String[] args){
        Vehicle car1, car2;
        car1 = new Vehicle();
        car2 = new Vehicle();

        //功率
        car1.setPower(128);
        car2.setPower(76);
        System.out.println("car1 的功率是：" + car1.getPower());
        System.out.println("car2 的功率是：" + car2.getPower());

        //加速
        car1.speedUp(80);
        car2.speedUp(100);
        System.out.println("car1 目前的速度：" + car1.getSpeed());
        System.out.println("car2 目前的速度：" + car2.getSpeed());

        //减速
        car1.speedDown(10);
        car2.speedDown(20);
        System.out.println("car1 目前的速度：" + car1.getSpeed());
        System.out.println("car2 目前的速度：" + car2.getSpeed());

        //超速+减速
        car1.speedUp(300);
        System.out.println("car1 目前的速度：" + car1.getSpeed());
        car2.speedDown(-100);
        System.out.println("car2 目前的速度：" + car2.getSpeed());

        //刹车
        car1.brake();
        System.out.println("car1 踩刹车，car1 目前的速度：" + car1.getSpeed());
    }
}
